/*
 * Copyright：fxsen <br/>
 * Date: 2021/9/23 10:02 <br/>
 * Author: <a href="mailto:fxsen@foxmail.com">fxsen</a>
 */
package com.fxsen.commons.sysmanager.core.service;

import com.fxsen.commons.core.base.common.service.ICommonService;
import com.fxsen.commons.sysmanager.core.entity.Menu;

import java.util.List;
import java.util.Map;

/**
 * @describe: 系统菜单服务接口 <br/>
 * @date: 2021/9/23 10:02 <br/>
 * @author: <a href="mailto:fxsen@foxmail.com">fxsen</a>
 */
public interface IMenuService extends ICommonService<Menu> {
    List<Menu> selectList();
    Map<String, Object> initMenu(String userId);
    /**
    * 查询子菜单
    * @param pId
    * @return {@link List}
    * @date 2021/12/8 16:36
    * @author <a href="mailto:fxsen@foxmail.com">fxsen</a> <br/>
    * @version 1.0.0 <br/>
    **/
    List<Menu> findByPid(String pId);
    /**
    * 通过角色查询菜单
    * @param roleId 角色id
    * @return {@link List}
    * @date 2022/1/24 9:38
    * @author fxsen
    **/
    List<Menu> findByRoleId(String roleId);
    List<Menu> findByUserId(String userId);
}
